home *** CD-ROM | disk | FTP | other *** search
-
-
-
- STRING C Library Procedures STRING
-
-
-
- NNAAMMEE
- strcat, strncat, strcmp, strncmp, strcasecmp, strncasecmp,
- strcpy, strncpy, strdup, strlen, strchr, index, strrchr,
- rindex, strstr, strspn, strcspn, strpbrk - string operations
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<ssttrriinngg..hh>>
-
- cchhaarr **ssttrrccaatt((ss,, aappppeenndd))
- cchhaarr **ss,, **aappppeenndd;;
-
- cchhaarr **ssttrrnnccaatt((ss,, aappppeenndd,, ccoouunntt))
- cchhaarr **ss,, **aappppeenndd;;
- iinntt ccoouunntt;;
-
- ssttrrccmmpp((ss11,, ss22))
- cchhaarr **ss11,, **ss22;;
-
- ssttrrnnccmmpp((ss11,, ss22,, ccoouunntt))
- cchhaarr **ss11,, **ss22;;
- iinntt ccoouunntt;;
-
- ssttrrccaasseeccmmpp((ss11,, ss22))
- cchhaarr **ss11,, **ss22;;
-
- ssttrrnnccaasseeccmmpp((ss11,, ss22,, ccoouunntt))
- cchhaarr **ss11,, **ss22;;
- iinntt ccoouunntt;;
-
- cchhaarr **ssttrrccppyy((ttoo,, ffrroomm))
- cchhaarr **ttoo,, **ffrroomm;;
-
- cchhaarr **ssttrrnnccppyy((ttoo,, ffrroomm,, ccoouunntt))
- cchhaarr **ttoo,, **ffrroomm;;
- iinntt ccoouunntt;;
-
- cchhaarr **ssttrrdduupp((ss))
- cchhaarr **ss;;
-
- ssttrrlleenn((ss))
- cchhaarr **ss;;
-
- cchhaarr **ssttrrcchhrr((ss,, cc))
- cchhaarr **ss;;
- iinntt cc;;
-
- cchhaarr **iinnddeexx((ss,, cc))
- cchhaarr **ss,, cc;;
-
- cchhaarr **ssttrrrrcchhrr((ss,, cc))
- cchhaarr **ss;;
- iinntt cc;;
-
-
-
- Sprite v1.0 April 12, 1991 1
-
-
-
-
-
-
- STRING C Library Procedures STRING
-
-
-
- cchhaarr **rriinnddeexx((ss,, cc))
- cchhaarr **ss,, cc;;
-
- cchhaarr **ssttrrssttrr((ss,, ss22))
- cchhaarr **ss,, **ss22;;
-
- iinntt ssttrrssppnn((ss,, ss22))
- cchhaarr **ss,, **ss22;;
-
- iinntt ssttrrccssppnn((ss,, ss22))
- cchhaarr **ss,, **ss22;;
-
- cchhaarr **ssttrrppbbrrkk((ss,, ss22))
- cchhaarr **ss,, **ss22;;
-
- DDEESSCCRRIIPPTTIIOONN
- These functions operate on null-terminated strings. They do
- not check for overflow of any receiving string.
-
- _S_t_r_c_a_t appends a copy of string _a_p_p_e_n_d to the end of string
- _s. _S_t_r_n_c_a_t copies at most _c_o_u_n_t characters. Both return a
- pointer to the null-terminated result.
-
- _S_t_r_c_m_p compares its arguments and returns an integer greater
- than, equal to, or less than 0, according as _s_1 is lexico-
- graphically greater than, equal to, or less than _s_2.
- _S_t_r_n_c_m_p makes the same comparison but looks at at most _c_o_u_n_t
- characters. _S_t_r_c_a_s_e_c_m_p and _s_t_r_n_c_a_s_e_c_m_p are identical in
- function, but are case insensitive. The returned lexico-
- graphic difference reflects a conversion to lower-case.
-
- _S_t_r_c_p_y copies string _f_r_o_m to _t_o, stopping after the null
- character has been moved. _S_t_r_n_c_p_y copies exactly _c_o_u_n_t
- characters, appending nulls if _f_r_o_m is less than _c_o_u_n_t char-
- acters in length; the target may not be null-terminated if
- the length of _f_r_o_m is _c_o_u_n_t or more. Both return _t_o.
-
- _S_t_r_d_u_p allocates storage for a copy of _s, copies _s into it,
- and returns the copied string. The copy may be freed by
- calling _f_r_e_e(3).
-
- _S_t_r_l_e_n returns the number of non-null characters in _s.
-
- _S_t_r_c_h_r and _i_n_d_e_x both return pointers to the first
- occurrence of character _c in string _s or NNUULLLL if _c does not
- occur in the string. The two procedures are identical
- except for their names and the argument _c, which is an iinntt
- in _s_t_r_c_h_r and a cchhaarr in _i_n_d_e_x. With the ANSI C standard,
- _i_n_d_e_x is becoming obsolete.
-
- _S_t_r_r_c_h_r and _r_i_n_d_e_x are identical to _s_t_r_c_h_r and _i_n_d_e_x except
- that the return the address of the last occurrence of _c
-
-
-
- Sprite v1.0 April 12, 1991 2
-
-
-
-
-
-
- STRING C Library Procedures STRING
-
-
-
- instead of the first. _R_i_n_d_e_x is also becoming obsolete.
-
- _S_t_r_s_t_r locates the first occurrence in the string pointed to
- by _s of the sequence of characters (not including the ter-
- minating null character) in the string pointed to by _s_2. If
- a match is found, the return value is the address of the
- first character in the matching substring. Otherwise, NNUULLLL
- is returned. If _s_2 points to a string with zero length,
- then _s is returned.
-
- _S_t_r_s_p_n returns the length of the longest initial segment of
- _s that consists entirely of characters from the string
- pointed to by _s_2. _S_t_r_c_s_p_n returns the length of the longest
- initial segment of _s that consists entirely of characters
- not in the string pointed to by _s_2.
-
- _S_t_r_p_b_r_k returns the address of the first character in the
- string pointed to by _s of any character in the string
- pointed to by _s_2. If no character from _s_2 occurs in _s_1,
- then NNUULLLL is returned.
-
-
- KKEEYYWWOORRDDSS
- compare, copy, string
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sprite v1.0 April 12, 1991 3
-
-
-
-